<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<!-- Skrypt pochodzi z ksiki "101 praktycznych skryptw"  -->
<!-- autor: Marcin Lis    e-mail: 101scripts@marcinlis.com  -->
</HEAD>
<SCRIPT LANGUAGE= "JavaScript" type= "text/javascript">
<!-- Ukrycie przed przegldarkami nie obsugujcymi JavaScriptu
var speed = 1;
var vv = 1;
var width = 0;
var layerWidth = 100;
function init(){
 if (document.layers){
         selector = document.layers['warstwa1'];
         width = screen.width;
 }
 else if (document.all){
         selector = document.all['warstwa1'].style;
         width = parseInt(document.body.clientWidth);
 }
 count = 1;
}
function przesun(){
 if (count < width - layerWidth){
         count++;
 }
 else{
         count = 1;
         vv = -vv;
 }
 selector.left = parseInt(selector.left) + vv;
 setTimeout("przesun()", speed);
}
// Koniec kodu JavaScript -->
</SCRIPT>
<BODY onLoad="init();przesun();">
<DIV     ID="warstwa1"
 style = "visibility:visible; background-color:red;
         position:absolute; top:50;
         left:0; width:100; height:100;
         layer-background-color:red;">
w a r s t w a
</DIV>
</BODY>
</HTML>
